
<section class="row" >
  <div class="col-md-6 col-sm-8 col-sm-push-2">
    <form class="form form-horizontal" [formGroup]="portalForm">
      <input type="hidden" id="id" formControlName="id" name="id">
      <div class="one-form-header"></div>
      <div class="one-form-body">
        <div class="form-group">
          <label for="portal_update_portalName" class="col-sm-4 control-label" ><span style="color: red;">*</span> 门户名称:</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" placeholder="门户名称" id="portal_update_portalName" required formControlName="name" name="name">
            <div *ngIf="formErrors.name" class="has-error">
              <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.name}} </label>
            </div>
          </div>
        </div>
        <div class="form-group">
          <label for="portal_update_addr" class="col-sm-4 control-label" ><span style="color: red;">*</span> URI:</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="portal_update_addr" required formControlName="code" name="code">
            <div *ngIf="formErrors.code" class="has-error">
              <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.code}} </label>
            </div>
          </div>
        </div>
        <div class="row">
          <label class="col-sm-4 control-label" >是否启用:</label>
          <div class="col-sm-8" >
            <div class="row">
              <div class="col-xs-4">
                <input type="radio" name="isEnable" id="portal_update_enabled"  [checked]="enableValue=='1'" value="1" formControlName="isEnable">
                <label for="portal_update_enabled">
                  启用
                </label>
              </div>
              <div class="col-xs-4">
                <input type="radio" name="isEnable" id="portal_update_disable"  [checked]="enableValue=='0'" value="0" formControlName="isEnable">
                <label for="portal_update_disable">
                  禁用
                </label>
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <label class="col-sm-4 control-label" >是否默认:</label>
          <div class="col-sm-8" >
            <div class="row">
              <div class="col-xs-4">
                <input type="radio" name="isDefault" id="portal_update_default" value="1" formControlName="isDefault">
                <label for="portal_update_default">
                  启用
                </label>
              </div>
              <div class="col-xs-4">
                <input type="radio" name="isDefault" id="portal_update_other" checked value="0" formControlName="isDefault">
                <label for="portal_update_other">
                  禁用
                </label>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="one-form-footer">
        <div class="pull-right">
          <button class="btn btn-default" type="reset" (click)="cancelPortalUpdate()">取消</button>
          <button class="btn btn-success" type="button" [disabled]="portalForm.invalid" (click)="onSubmit()">提交</button>
        </div>
      </div>
    </form>
  </div>
</section>
